home *** CD-ROM | disk | FTP | other *** search
- '…ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
- '∫ ∫
- '∫ PIXEL: Demo of pixel plotting routine for VGA mode 12 / 640x480x16 color. ∫
- '∫ Downloaded from the Grey Matter Electronic Mail and Shareware File Center ∫
- '∫ ∫
- '»ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
- '
- '…ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
- '∫ ∫
- '∫ Don't forget to give the Grey Matter Electronic Mail and Shareware File ∫
- '∫ Center a call. Open 24 hours a day, 7 days a week. Reasonable rates ∫
- '∫ (subscribe online with your MC/Visa), over seven thousand files online ∫
- '∫ as of March 3, 1993. Megabytes more coming in every day from all over ∫
- '∫ the country. If you're a programmer you'll find lots of useful source ∫
- '∫ code, thousands of utilities, and technical information on everything ∫
- '∫ from graphic file formats to sound card programming. Check us out ... ∫
- '∫ we're always here! ∫
- '∫ ∫
- '»ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
-
- 'Procedure declarations.
-
- DECLARE SUB ShowRegion (X%, Y%, w%, h%, f%, d%)
- DECLARE SUB PIXEL (X AS INTEGER, Y AS INTEGER, c AS INTEGER, m AS INTEGER)
-
- 'Initialize screen display to 640x480x16 color VGA. Clear palette entry
- '15 to 0 so that hidden text may be printed on a black background.
-
- SCREEN 12: LOCATE 3
- PALETTE 15, 0
-
- 'Generate text screen, but plot it in color 15 so that it won't show up
- 'right away.
-
- COLOR 15
-
- PRINT " This is a piece of sample code to demonstrate using the PIXEL routine."
- PRINT " It really is pretty straightforward, just pass it the following"
- PRINT " parameters:"
- PRINT
- PRINT " PIXEL <xcoord>, <ycoord>, <color>, <maskcolor>"
- PRINT
- PRINT " 1. The x co-ordinate may range from 0 - 639."
- PRINT
- PRINT " 2. The y co-ordinate may range from 0 - 479."
- PRINT
- PRINT " 3. The color value may range from 0 - 15."
- PRINT
- PRINT " 4. The mask color may range from 0 - 15."
- PRINT
- PRINT " If any of you assembler jocks out there make any interesting improvements"
- PRINT " or other modifications to the PIXEL routine, we'd appreciate your uploading"
- PRINT " a copy of your modified source code to our system:"
- PRINT
- PRINT " The Grey Matter Electronic Mail and Shareware File Center (708) 208-0662"
- PRINT " (Member of SourceNet: The Programmer's Network) (708) 208-4716"
- PRINT
- PRINT " Over seven thousand files online as of March 2, 1993, something for"
- PRINT " everyone. Lots of useful source files and technical information; if"
- PRINT " you're a programmer check us out. All lines are USR 14400.";
- PRINT
- PRINT
-
- PRINT " PRESS ANY KEY TO CONTINUE"
-
- 'Now, selectively display the pre-printed hidden text by updating the text
- 'in each of the regions defined below.
-
- ShowRegion 20, 0, 580, 80, 9, 3
- ShowRegion 30, 80, 500, 30, 10, 1
- ShowRegion 30, 110, 430, 140, 12, 2
- ShowRegion 20, 250, 610, 60, 13, 1
- ShowRegion 20, 320, 610, 30, 11, 2
- ShowRegion 20, 350, 610, 65, 14, 3
- ShowRegion 120, 430, 350, 6, 6, 1
- ShowRegion 120, 436, 350, 8, 7, 2
-
- 'Wait here until key pressed.
-
- DO: LOOP UNTIL INKEY$ <> ""
-
- SUB ShowRegion (X%, Y%, w%, h%, f%, d%)
-
- SELECT CASE d%
-
- CASE 1
-
- FOR xcoord% = X% TO X% + w%
- FOR ycoord% = Y% TO Y% + h%
- PIXEL xcoord%, ycoord%, f%, 15
- NEXT ycoord%
- NEXT xcoord%
-
- CASE 2
-
- FOR xcoord% = X% + w% TO X% STEP -1
- FOR ycoord% = Y% TO Y% + h%
- PIXEL xcoord%, ycoord%, f%, 15
- NEXT ycoord%
- NEXT xcoord%
-
- CASE 3
-
- FOR ycoord% = Y% TO Y% + h%
- FOR xcoord% = X% TO X% + w%
- PIXEL xcoord%, ycoord%, f%, 15
- NEXT xcoord%
- NEXT ycoord%
-
- CASE ELSE
-
- END SELECT
-
- END SUB
-
-